#!/bin/sh
rm -rf dist/*
npm run build

gzip -9 -N dist/

system=$(uname)
if [ "$system"x = "Linux"x ]; then
    echo "检测到使用 Linux 系统"
    release_md5=$(md5sum dist/index.js | awk '{print $1}')
elif [ "$system"x = "Darwin"x ]; then
    echo "检测到使用 Mac 系统"
    release_md5=$(md5 dist/index.js | awk '{print $4}')
else
    echo "不知道是什么系统"
fi
echo $release_md5

